package com.leyou.search.pojo;

import com.leyou.common.pojo.PageResult;
import com.leyou.item.pojo.Brand;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SearchResult extends PageResult<Goods> {

    private List<Map<String, Object>> categories; // 分类（cid3:name)
    private List<Brand> brands; // 品牌信息(brand)
    private List<Map<String, Object>> specs; // 规格与规格参数(name:value)

    public SearchResult(List<Goods> items, Long total, List<Map<String, Object>> categories, List<Brand> brands, List<Map<String, Object>> specs) {
        super(items, total);
        this.categories = categories;
        this.brands = brands;
        this.specs = specs;
    }

    public SearchResult(Long total, Integer totalPage, List<Goods> items, List<Map<String, Object>> categories, List<Brand> brands, List<Map<String, Object>> specs) {
        super(items, total, totalPage);
        this.categories = categories;
        this.brands = brands;
        this.specs = specs;
    }
}
